import request from '@/utils/request'

// 查询平台优惠券列表
export function listCoupon_admin(query) {
  return request({
    url: '/coupon/coupon_admin/list',
    method: 'get',
    params: query
  })
}

// 查询平台优惠券详细
export function getCoupon_admin(id) {
  return request({
    url: '/coupon/coupon_admin/' + id,
    method: 'get'
  })
}

// 新增平台优惠券
export function addCoupon_admin(data) {
  return request({
    url: '/coupon/coupon_admin',
    method: 'post',
    data: data
  })
}

// 修改平台优惠券
export function updateCoupon_admin(data) {
  return request({
    url: '/coupon/coupon_admin',
    method: 'put',
    data: data
  })
}

// 删除平台优惠券
export function delCoupon_admin(id) {
  return request({
    url: '/coupon/coupon_admin/' + id,
    method: 'delete'
  })
}
